<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>银行密码</title>
</head>
<body>
	<script type="text/javascript">
		var password=prompt("请输入密码");

		if (password.length!=6) {
			alert("请输入6位") 
		}
		else {
			if (isNaN(password)) 
			{alert("密码必须是数字");} 
		    else{alert("密码设置成功");}
		}
	</script>

</body>
</html>